﻿using SD.Infrastructure.EntityBase;
using System;

namespace SlamDunk.MES.Domain.Entities.PlanContxt
{
    /// <summary>
    /// 生产物料需求
    /// </summary>
    public class ProductionMaterialAsk : PlainEntity, ISortable
    {
        #region # 构造器

        #region 00.无参构造器
        /// <summary>
        /// 无参构造器
        /// </summary>
        protected ProductionMaterialAsk() { }
        #endregion

        #region 01.创建生产物料需求构造器
        /// <summary>
        /// 创建生产物料需求构造器
        /// </summary>
        /// <param name="materialId">物料定义Id</param>
        /// <param name="materialLotId">物料批次Id</param>
        /// <param name="quantity">数量</param>
        /// <param name="sort">排序</param>
        /// <param name="description">描述</param>
        public ProductionMaterialAsk(Guid materialId, Guid? materialLotId, decimal quantity, int sort, string description)
            : this()
        {
            this.MaterialId = materialId;
            this.MaterialLotId = materialLotId;
            this.Quantity = quantity;
            this.Sort = sort;
            this.Description = description;
        }
        #endregion

        #endregion

        #region # 属性

        #region 物料定义Id —— Guid MaterialId
        /// <summary>
        /// 物料定义Id
        /// </summary>
        public Guid MaterialId { get; private set; }
        #endregion

        #region 物料批次Id —— Guid? MaterialLotId
        /// <summary>
        /// 物料批次Id
        /// </summary>
        public Guid? MaterialLotId { get; private set; }
        #endregion

        #region 数量 —— decimal Quantity
        /// <summary>
        /// 数量
        /// </summary>
        public decimal Quantity { get; private set; }
        #endregion

        #region 排序 —— int Sort
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; private set; }
        #endregion

        #region 描述 —— string Description
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; private set; }
        #endregion

        #region 导航属性 - 生产计划 —— ProductionPlan ProductionPlan
        /// <summary>
        /// 导航属性 - 生产计划
        /// </summary>
        public virtual ProductionPlan ProductionPlan { get; internal set; }
        #endregion

        #endregion
    }
}
